package com.lejin.usercenter.controller;


import com.lejin.interceptor.UserInfoInterceptor;
import com.lejin.usercenter.service.IOrderInfoService;
import com.lejin.vo.ResultVO;
import com.sun.media.sound.SoftTuning;
import org.aspectj.weaver.ast.Var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 订单信息表 前端控制器
 * </p>
 *
 * @author luminghua
 * @since 2022-04-22
 */
@RestController
@RequestMapping("/usercenter/order-info")
@CrossOrigin
public class OrderInfoController {

    @Autowired
    private UserInfoInterceptor userInfoInterceptor;
    @Autowired
    private IOrderInfoService iOrderInfoService;

    @GetMapping("list")
    public ResultVO list(){
        String s = userInfoInterceptor.getThreadLocal().get();
        System.out.println(s);
        ResultVO orderByUid = iOrderInfoService.findOrderByUid(s);
        return orderByUid;

    }

}
